4 # IMPORTANT: Use the following statement at the TOP OF EVERY TEST SCRIPT
5 # to ensure that this package's 'bin/' subfolder is added to the path so that
6 # this package's CLIs can be invoked by their mere filename in the rest
9 PATH
=${PWD%%/test*}/bin
:$PATH
11 # Helper function for error reporting.
12 die
() { (( $# > 0 )) && echo "ERROR: $*" >&2; exit 1; }
14 # Invoke whichpm -a, which lists all locally installed modules.
15 # As a sanity check, we make sure that at least several are output.
17 outCount
=$
(whichpm
-a |
head -n $count |
wc -l) || die
19 (( outCount
== count
)) || die
"Expected at least $count lines, got $outCount."